﻿<ui:composition xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://java.sun.com/jsf/html" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:f="http://java.sun.com/jsf/core" xmlns:p="http://primefaces.org/ui">
	<p:messages autoUpdate="true" />
	<h:form id="formLoanApplication">
		<p:layout style="width:1200px; height:820px;">
			<p:layoutUnit position="west" size="450">
				<p:menu id="loanApplicationPanel" style="width:400px">
					<p:submenu label="Alapadatok menü">
						<p:menuitem value="1. Alapadatok" id="basicLoanDataAjax" update="loanApplicationPanel loanApplicationDisplay" action="#{customerMaintBean.viewBasicLoanData()}" icon="ui-icon-basicLoanData" />
						<p:menuitem disabled="#{customerMaintBean.loanApplication.status == 0}" value="2. Adminisztrációs adatok" id="administrationDataAjax" update="loanApplicationPanel loanApplicationDisplay" action="#{customerMaintBean.viewAdministrationData()}" icon="ui-icon-basicLoanData" />
					</p:submenu>
					<p:submenu label="Adós adatok">
						<p:menuitem value="3. Személyes adatok" update="loanApplicationPanel loanApplicationDisplay" id="personalDataAjax" action="#{customerMaintBean.viewPersonalData()}" icon="ui-icon-basicLoanData" />
						<p:menuitem value="4. Jövedelem adatok" update="loanApplicationPanel loanApplicationDisplay" id="incomeDataAjax" action="#{customerMaintBean.viewIncomeData()}" icon="ui-icon-basicLoanData" />
						<p:menuitem value="5. Bankkapcsolati adatok" update="loanApplicationPanel loanApplicationDisplay" id="bankRelationshipDataAjax" action="#{customerMaintBean.viewBankRelationshipData()}" icon="ui-icon-basicLoanData" />
					</p:submenu>
					<!-- 					<sec:authorize ifAnyGranted="BIRALO_ROLE"> -->
					<p:submenu label="Verifikáció" rendered="#{customerMaintBean.loanApplication.status > 1}">
						<!-- 					<p:submenu label="Verifikáció" > -->
						<p:menuitem value="9. Verifikáció" update="loanApplicationPanel loanApplicationDisplay" id="verificationAjax" action="#{customerMaintBean.viewVerification()}" icon="ui-icon-basicLoanData" />
					</p:submenu>
					<!-- 					</sec:authorize> -->
					<p:submenu label="Dokumentumok/Nyomtatás">
						<!-- 						<p:menuitem value="Igényléssel kapcslatos dokumentumok" update="loanApplicationPanel loanApplicationDisplay" id="relatedDocumentsAjax" action="#{customerMaintBean.viewRelatedDocuments()}" -->
						<!-- 							styleClass="ui-priority-primary" icon="ui-icon-arrowrefresh-1-w" /> -->
						<p:menuitem value="6. Nyomtatás" update="loanApplicationPanel loanApplicationDisplay" id="printAjax6" action="#{customerMaintBean.viewPrint()}" icon="ui-icon-print" />
<!-- 						<p:menuitem rendered="#{customerMaintBean.loanApplication.status gt 1}" value="8. Nyomtatás" update="loanApplicationPanel loanApplicationDisplay" id="printAjax8" action="#{customerMaintBean.viewPrint()}" icon="ui-icon-print" /> -->
					</p:submenu>
					<p:submenu label="Folyósítás" rendered="#{customerMaintBean.loanApplication.status > 1}">
<!-- 					<p:submenu label="Folyósítás" rendered="true"> -->
						<p:menuitem value="10. Folyósítás" update="loanApplicationPanel loanApplicationDisplay" id="disbursementAjax" action="#{customerMaintBean.viewDisbursement()}" icon="ui-icon-moneyTransfer" />
					</p:submenu>
					<p:submenu label="Eredmények">
						<!-- <p:menuitem value="Minimumfeltétel ellenőrzés" update="loanApplicationPanel loanApplicationDisplay" id="minimumConditionCheckingAjax" action="#{customerMaintBean.viewMinimumConditionChecking()}" -->
						<!-- actionListener="#{customerMaintBean.setEditTrue()}" icon="ui-icon-checkingAccount" /> -->
						<p:menuitem value="5. Minimumfeltétel ellenőrzés" update="loanApplicationPanel loanApplicationDisplay" id="minimumConditionCheckingAjax" action="#{customerMaintBean.viewMinimumConditionChecking()}" icon="ui-icon-results" />
						<p:menuitem value="7. Eredmény képernyő" update="loanApplicationPanel loanApplicationDisplay" id="resultScreenAjax" action="#{customerMaintBean.viewResultScreen()}" icon="ui-icon-results" />
					</p:submenu>
				</p:menu>
			</p:layoutUnit>
			<p:layoutUnit position="center">
				<h:panelGroup id="loanApplicationDisplay">
					<ui:include src="#{customerMaintBean.loanApplicationPage}" />
				</h:panelGroup>
			</p:layoutUnit>
			<p:layoutUnit position="south" header="" size="100">
				<h:panelGroup id="footer">
					<h:panelGrid columns="5" style="margin-bottom:10px" cellpadding="5">
						<p:commandButton value="Vissza az ügyfélképre" immediate="true" update=":form:panel :display" id="ajax4CDS" action="#{navigationBean.viewCustomerDataSheet()}" />

						<p:commandButton value="Feladat lezárása" update=":form:panel :display" process="@form" id="ajax4CDSb" actionListener="#{customerMaintBean.closeTask()}" action="#{navigationBean.viewCustomerDataSheet()}" disabled="#{!customerMaintBean.canBeFinished}" rendered="#{customerMaintBean.loanApplication.status lt 3}" />

<!-- 						<p:commandButton value="Feladat befejezése" disabled="#{!customerMaintBean.canBeFinished}" actionListener="#{customerMaintBean.setCanBeFinished()}" update=":form:panel :display" process="@form" id="ajax4CDSc" -->
<!-- 							action="#{navigationBean.viewCustomerDataSheet()}" /> -->

						<!-- 						<p:commandButton value="Feladat felfüggesztése" update=":form:panel :display" id="ajax4CDSd" action="#{navigationBean.viewCustomerDataSheet()}" /> -->
					</h:panelGrid>
				</h:panelGroup>
			</p:layoutUnit>
		</p:layout>
	</h:form>
</ui:composition>